<let/count = 0/>
<button id="tags" data-parent=input.count onClick() { count++ }>
  ${count}
</button>